Skip to content

test: run the blog e2e against a Bun-served blog (#523)#525

Merged
vivek7405 merged 4 commits into
mainfrom
feat/blog-e2e-on-bun
Jun 14, 2026
Merged

test: run the blog e2e against a Bun-served blog (#523)#525
vivek7405 merged 4 commits into
mainfrom
feat/blog-e2e-on-bun

Conversation

@vivek7405

@vivek7405 vivek7405 commented Jun 14, 2026

Copy link
Copy Markdown
Collaborator

Closes #523

Add a cross-runtime e2e: the harness stays on node --test (its node:test hook lifecycle breaks under bun test), but startBlog now spawns the blog server under Bun when WEBJS_E2E_RUNTIME=bun is set. This runs the full Puppeteer suite against a Bun-served blog, proving the Bun.serve shell and Prisma-on-Bun in a real browser, and runs as a second e2e step in CI.

Result

Full e2e under Bun: 83 pass, 0 fail, 4 skipped. The 4 skips are documented and runtime-correct:

It found a real bug (#528)

The Bun run surfaced a genuine framework bug, not a runtime gap: an async render() component that reads a signal goes inert after its on-hydration re-fetch (which only happens when seeding is off, always on Bun). Reproduced on Node with WEBJS_SEED=0, so it is a framework bug to FIX (filed as #528), not a Bun carve-out. Seeding masks it by default on Node. The abort test is skipped on Bun referencing #528; the skip is removed when #528 lands.

Surfaces

  • test/e2e/e2e.test.mjs: the WEBJS_E2E_RUNTIME=bun runtime override + the gated tests.
  • .github/workflows/ci.yml: a second e2e run with the blog on Bun (the e2e job already has chromium + the seeded DB).
  • N/A: no published-package source changed (test + CI only), so no version bump / changelog.

The e2e harness must run under node --test (its node:test hook lifecycle does
not survive bun test), but the blog server it spawns can run on Bun. Add a
WEBJS_E2E_RUNTIME=bun override (WEBJS_BUN_PATH for the binary) so the full
browser e2e exercises a Bun-served blog, proving the Bun.serve shell and
Prisma-on-Bun end to end. Closes #523.
@vivek7405 vivek7405 self-assigned this Jun 14, 2026
t added 3 commits June 15, 2026 02:32
SSR action seeding (#472/#488) rides module.registerHooks, which Bun lacks, so
on Bun it is disabled fail-open (the component re-fetches over RPC, data still
correct). Gate the three seeded-vs-RPC assertions on WEBJS_E2E_RUNTIME so they
skip on Bun, matching the Bun unit-test matrix's seed-hook carve-out.
The blog e2e under Bun surfaced a real framework bug (#528): an async-render
component reading a signal goes inert after its on-hydration re-fetch (seeding
off), so a signal bump never supersedes a fetch to abort. Reproduced on Node with
WEBJS_SEED=0, so it is a framework bug to fix, not a Bun carve-out. Skip the abort
test on Bun referencing #528 so the rest of the cross-runtime e2e is green; remove
the skip when #528 lands.

@vivek7405 vivek7405 left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ran the full suite against a Bun-served blog and it comes back 83 pass, 4 skipped, 0 fail. The override is scoped to just the blog spawn (node default untouched), and the four skips are exactly the runtime-fragile ones: the three seeding assertions (node-only since Bun has no module.registerHooks) and the abort test, which is where this got interesting. The abort failure on Bun is not a Bun gap, it is a real reactivity bug: an async render that reads a signal goes inert after its on-hydration re-fetch, and it reproduces on node with WEBJS_SEED=0. Filed that as #528 and gated the one test against it rather than papering over it. The other async-render tests stay un-gated because they do not take the on-hydration re-fetch path. Worth running the suite under Bun in CI the way this does, it is how #528 surfaced at all.

@vivek7405 vivek7405 left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Checked the one thing I had not executed: running the suite twice against the same seeded DB. It is safe. The only DB write in the e2e is the signup, which mints a unique email per run, the feedback action does not touch Prisma, and nothing asserts an exact row count or a fixed seeded row. The Bun start is fine too, the ready log fires when the socket binds, before the jspm vendor resolve, so the 15s ready window never waits on a cold resolve. Good to merge.

@vivek7405 vivek7405 marked this pull request as ready for review June 14, 2026 21:46
@vivek7405 vivek7405 merged commit 4ffd110 into main Jun 14, 2026
8 checks passed
@vivek7405 vivek7405 deleted the feat/blog-e2e-on-bun branch June 14, 2026 21:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

dogfood: verify and enable Prisma-on-Bun so examples/blog runs on the Bun runtime

1 participant